$OpenBSD: patch-src_cheat_cpp,v 1.1 2017/04/18 22:00:34 espie Exp $
--- src/cheat.cpp.orig	Tue Apr 18 23:40:44 2017
+++ src/cheat.cpp	Tue Apr 18 23:41:03 2017
@@ -216,7 +216,7 @@ void FCEU_LoadGameCheats(FILE *override)
 	}
 
 	FCEU_DispMessage("Cheats file loaded.",0); //Tells user a cheats file was loaded.
-	while(fgets(linebuf,2048,fp)>0)
+	while(fgets(linebuf,2048,fp) != NULL)
 	{
 		char *tbuf=linebuf;
 		int doc=0;
